# -*- python -*-
#:kivy 1.0

<TastingCompactButton>:
    background_color: purple
    color: purple2    
    height: max(self.texture_size[1]+2*self.padding_y, 32)
    width: self.texture_size[0]
    canvas:
        Clear
        Color:
            rgba: self.background_color# if  self.state == 'normal' else purple4
        Rectangle:
            pos: (self.x+1, self.y+1)
            size: (self.width-2, self.height-2)
        Color:
            rgba: self.color
        Rectangle:
            texture: self.texture
            size: self.texture_size
            pos: int(self.center_x +self.padding_x  - self.texture_size[0] / 2.), int(self.center_y - self.texture_size[1] / 2.+self.padding_y)

<WordStack>:
    stack: _stack
    orientation: 'vertical'
    StackLayout:
        id: _stack
        spacing: 3
    LeVinButton:
        text: _('Ok')
        on_release: root.parentPopup.dismiss()
        
<TastingEditWidget>:
    editorList: _editorList
    orientation: 'vertical'
    advanced_mode: _bMode.state != 'normal'
    MyListView:
        id: _editorList
        num_columns: 2
        none_selectable: True
    LeVinButtonBar:
        size_hint: (1,None)
        LeVinButton:
            text: _('Cancel')
            on_release: guiCommon.commonEvents.dispatch('on_end_edit_tasting',None,False)
        LeVinButton:
            text: _('Ok')
            on_release: guiCommon.commonEvents.dispatch('on_end_edit_tasting',root.current_bottle,True)
        LeVinToggleButton:
            id: _bMode
            text: _('Detailed Mode') if self.state =='normal' else _('Simple Mode')
            on_press:root.switchMode()
            
    
